home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_07_02
/
v7n2065a.txt
< prev
next >
Wrap
Text File
|
1988-09-13
|
826b
|
30 lines
/* STRATEGY.C ** "Strategy" code as defined for device drivers.
-- R.D.Allen, 9/4/87
Copyright 1987, 1988 PARS Service Partnership
*/
#pragma inline
#include "rqh.h"
/*********
* NAME: STRATEGY (a far function)
* USE: Store the address of the request header for later
* processing by DOSIO. This is the classic "strategy" routine
* as described in Device Driver manuals. DOS passes the request
* header and this routine saves it for DOSIO (the "interrupt"
* routine) to parse.
* Can be done in C with pseudo variables (but ASM is tighter):
* ptr.address.offset = _BX;
* ptr.address.segment = _ES;
* INPUT: void
* OUTPUT: void
*********/
void far strategy(void)
{
asm extrn _ptr:near
asm mov cs:Word Ptr _ptr, bx
asm mov cs:Word Ptr _ptr + 2, es
}